package com.aiks.single.singlemavenproject.configuration;

import org.springframework.beans.factory.annotation.Value;

/**
 * @author <a href="mailto:yuanz@yxt.com">yuanz</a>
 * @date 2022-01-27 15:11
 * @since 1.0.0
 **/
//@Configuration
public class NacosRegisterConfiguration {
    @Value("${server.port}")
    private int serverPort;
    
    @Value("${spring.application.name}")
    private String applicationName;
    
    @Value("${nacos.discovery.group}")
    private String groupName;
    
//    @NacosInjected
//    private NamingService namingService;

//    @PostConstruct
//    public void registerInstance() throws NacosException {
//        namingService.registerInstance(applicationName, groupName,
//            IpUtils.getIp(), serverPort, "DEFAULT");
//    }
}
